/*
 * @Author: luochun 
 * @Date: 2024-07-07 13:22:44 
 * @Last Modified by: luochun
 * @Last Modified time: 2024-07-07 17:12:20
 * 探索对象
 */


// 创建对象其实是 new 关键字起作用， 但是一般约定构造函数以大写开头
function obj (){
    this.name = 'luochun'
    this.age = 24
}
const a = new obj()
console.log('🚀 ~ This is a result of console.log ~ ✨: ', a);

// 利用对象统计字符出现的次数
const str = 'I have a bag in your room'
let o = {}

for( i= 0; i < str.length; i++) {
    const char = str.charAt(i)
    if (char.trim() === '') continue
    if (o[char] !== undefined) {
        o[char]++
    } else {
        o[char] = 1
    }
}

console.log('🚀 ~ This is a result of console.log ~ ✨: ', o);

function func(a, b, c) {
    console.log('🚀 ~ This is a result of console.log ~ ✨: ', a, b, c);
}


func(1, 2)
